#ifndef TRIANGLE_H
#define TRIANGLE_H

#include <list>
//#include "objobject.h"

//forward declaration
class OBJObject;

class Triangle {
	public:
		int m_id;
		//vertices
		float m_x1, m_y1, m_z1;
		float m_x2, m_y2, m_z2;
		float m_x3, m_y3, m_z3;

		//vertex normals
		float m_normalx1, m_normaly1, m_normalz1;
		float m_normalx2, m_normaly2, m_normalz2;
		float m_normalx3, m_normaly3, m_normalz3;
		
		float m_texcoordu1, m_texcoordv1;
		float m_texcoordu2, m_texcoordv2;
		float m_texcoordu3, m_texcoordv3;

		OBJObject *m_ownerOBJ;

		Triangle();

		//vertX-Z are the index numbers of the vertices
		Triangle(int vert1, int vert2, int vert3, OBJObject *ownerOBJ);
		void addNormals(int vnorm1, int vnorm2, int vnorm3);
		void addTexCoords(int vt1, int vt2, int vt3);

		~Triangle();

		void drawTriangle();		
};

#endif
